/**
 * 
 */
package com.davetrudes.jung.client.graphics.component;

import com.davetrudes.jung.client.graphics.Color;
import com.davetrudes.jung.client.graphics.Component;
import com.davetrudes.jung.client.graphics.Dimension;

/**
 * @author dave.trudes
 *
 */
public class JComponent implements Component {

	protected Dimension size;
	protected Color foreground = Color.black;
	protected Color background = Color.white;
	
	public JComponent(Dimension size){
		this.size = size;
	}
	
	/**
	 * @return the size
	 */
	public Dimension getSize() {
		return size;
	}

	/**
	 * @param size the size to set
	 */
	public void setSize(Dimension size) {
		this.size = size;
	}


	@Override
	public Dimension getPreferredSize() {
		return size;
	}
	

	/**
	 * @return the foreground
	 */
	public Color getForeground() {
		return foreground;
	}


	/**
	 * @param foreground the foreground to set
	 */
	public void setForeground(Color foreground) {
		this.foreground = foreground;
	}


	/**
	 * @return the background
	 */
	public Color getBackground() {
		return background;
	}


	/**
	 * @param background the background to set
	 */
	public void setBackground(Color background) {
		this.background = background;
	}


	
}
